// pages/index/patient/patient.js
var t = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    UnbankedRegister: [{
      userId: 1,
      userIcon: '/assets/images / head.png',
      name: '小明',
      nmGender: '女',
      age: 30,
      remarkName: '小红'
    },
    {
      userId: 1,
      userIcon: '/assets/images / head.png',
      name: '小明',
      nmGender: '女',
      age: 30,
      remarkName: '小红'
    },
    {
      userId: 1,
      userIcon: '/assets/images / head.png',
      name: '小明',
      nmGender: '男',
      age: 30,
      remarkName: '小红'
    }
    ]
  },
  input: function (t) {
    console.log(t.detail.value), this.setData({
      input: t.detail.value
    });
  },
  grabble: function (t) {
    var a = this;
    console.log(a.data.input), wx.setStorageSync("input", a.data.input), "" != a.data.input ? wx.navigateTo({
      url: "/hyb_yl/backstageFollowUp/pages/casControlSeet/casControlSeet",
      success: function (t) { }
    }) : wx.showToast({
      title: "请输入患者名字",
      icon: "none",
      duration: 1e3
    });
  },
  agree: function (e) {
    var daninfo = this.data.hzinfo[e.currentTarget.dataset.index]
    var pages = getCurrentPages();
    var prevPage = pages[pages.length - 2];
    prevPage.setData({
      daninfo: daninfo,
      perfect:1
    })
    wx.navigateBack({
      delta: 1
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    var hzinfo = JSON.parse(options.hzinfo)
    console.log(hzinfo)
    that.setData({
      hzinfo: hzinfo
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})